<template>
  <div>
    <span v-for="menu in menuList">
      <el-submenu :index="menu.url+''" v-if="menu.childMenus && menu.childMenus.length>0">
      <!--子菜单的内容-->
      <template slot="title">
        <i :class="menu.icon"></i>
        <span>{{ menu.menuName }}</span>
      </template>
       <side-menu :menuList="menu.childMenus"></side-menu>
    </el-submenu>
    <el-menu-item :class="menu.icon" :index="menu.url+''" v-else>
      {{ menu.menuName }}
    </el-menu-item>
    </span>
  </div>
</template>

<script>
import Menu from '../Home/SideMenu'

export default {
  data() {
    return {}
  },
  comments:{
    Menu,
  },
  props: ["menuList"],
  name: "SideMenu",
}
</script>

<style scoped>

</style>